package com.firesrc.service.impl;

import java.util.List;

import com.firesrc.bean.SendRecord;
import com.firesrc.dao.SendRecordDao;
import com.firesrc.dao.impl.SendRecordDaoImpl;
import com.firesrc.service.SendRecordService;

public class SendRecordServiceImpl implements SendRecordService {
	private SendRecordDao dao;

	public SendRecordServiceImpl() {
		dao = new SendRecordDaoImpl();
	}

	@Override
	public void add(SendRecord sendRecord) {
		dao.add(sendRecord);

	}

	@Override
	public int getCountByMail(String string) {
		// TODO Auto-generated method stub
		return dao.getCountByMail(string);
	}

	@Override
	public void delete(String parameter) {
		SendRecord sendRecord = new SendRecord();
		sendRecord.setId(parameter);
		dao.delete(sendRecord);

	}

	@Override
	public List<SendRecord> getAllList() {
		return dao.getAllList(new SendRecord());
	}

	@Override
	public List<SendRecord> getTodaySendList() {
		return dao.getTodaySendList();
	}

}
